import request from '@/utils/request'

export function adminpage({id,account,name,age,gender,role,number,password,page,pageSize}) {
    return request({
        url: 'admin/page',
        method: 'get',
        params: {
            id,
            account,
            name,
            age,
            gender,
            role,
            number,
            password,
            page,
            pageSize
        }
    })
}
export function addadmin(Admin) {
    return request({
        url: 'admin/save',
        method: 'post',
        data: Admin,
    })
}

export function getById(id) {
    return request({
        url: 'admin/'+id,
        method: 'delete',
    })
}

export function selectById(id) {
    return request({
        url: 'admin/'+id,
        method: 'get',
    })
}

export function update(Admin) {
    return request({
        url: 'admin/update',
        method: 'put',
        data : Admin
    })
}
